WML Tags and Attributes
WML Document Skeleton
Certain tags define the basic framework of a WML document. The tags listed below make up the basic skeleton of a WML document. The designated IP telephones support these tags unless otherwise indicated.
- Common tag attributes: xml:lang, class, and id.
The attributes xml:lang, class and id are universal attributes associated with each WML element.
The Web browser supports these tags:
| Attribute |
Comments |
| xml:lang |
NOT SUPPORTED |
| class |
NOT SUPPORTED |
| id |
SUPPORTED |
- <wml> tag - The <wml> tag defines a deck of cards and encloses all information about the deck. This tag is a required WML element, must contain at least one <card> tag, and can additionally contain one <head> tag.
- <head> tag - The <head> tag is an optional WML tag. This tag contains information that relates to the deck as a whole, including meta-data and access control elements. The <head> tag can optionally contain at least one <meta> element or one <access> element.
- <meta> tag - The optional <meta> tag is contained between multiple <head> tags. This tag gives values for the parameters that describe the content of the deck.
| Attribute |
Value(s) |
Description |
Comments |
| context |
cdata |
Should specify the name attribute description. |
SUPPORTED. |
| name |
keyword |
Name portion of the name content value. |
SUPPORTED. |
| forua |
True or False |
Specifies if meta data is sent to the browser. If “True” meta data must be sent to the browser |
NOT SUPPORTED. |
| http-equiv |
cdata |
Sets whether the <meta> tag content is bound to an http response header. |
NOT SUPPORTED. |
| scheme |
cdata |
Specifies the structure used to translate the meta data. |
NOT SUPPORTED. |
The page author can customize the title “Browser” using the <meta> tag with the name attribute equal to “title”. For example:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta name="title" content="Da Browser" />
</head>
<card>
...
</card>
</wml>
- <card> tag - A single WML file can contain multiple cards, supporting the analogy of a “deck” of “cards” within a single WML file. A “card” is essentially the specification of one specific WML page. This is a mandatory tag.
The card element attributes supported by the Web browser are as follows. Unsupported attributes are indicated as such in the Comments column.
| Attribute |
Value(s) |
Description |
Comments |
| newcontext |
true
false |
Re-initializes the browser context. Default is “false.” |
Clears out the current WML browser context, which entails emptying the navigation stack history and clearing out all variables. When newcontext is set to true the Web browser clears its history buffer and captures and buffers the WML card title attribute of the WML card with the newcontext tag. This buffered attribute is used as the title for every WML element with a null or missing title attribute, including top-level cards. When set to true, the Web browser home page will not be loaded. SUPPORTED. Note: Page authors must include this attribute where it is necessary to clear the history stack. |
| ordered |
true
false |
Specifies the order of card content. When ordered is set to “true” the browser displays the content in a fixed order. When ordered is set to “false” the users decide the order as they navigate between content. Default is “true.” |
Optional. Sets a Boolean value that provides information on how the content of the current card is arranged. Used by the browser to organize the display presentation and layout. If set to true, content is organized in a linear sequence of elements - for example, a series of ordered or non-optional input elements. If set to false, content is in no natural order - for example, a series of unordered or optional input elements. The default is true. NOT SUPPORTED. |
| title |
cdata |
The title of the card. |
Can be used for title displays. SUPPORTED. |
| onenterbackward |
url |
Occurs when the user navigates into a card by means of a “prev” task. |
SUPPORTED. |
| onenterforward |
url |
Occurs when the user navigates into a card by means of a “go” task. |
SUPPORTED. |
| ontimer |
url |
Occurs when a “timer” expires. |
SUPPORTED. |
| style |
property |
Cascading Style Sheet attribute. |
SUPPORTED. |
If a onenterforward or onenterbackward attribute is defined for a <card> tag and the <card> tag also has an <onevent> tag defined with a onenterforward or onenterbackward event type, the attribute defined in the card tag supersedes the <onevent> binding.
- <template> tag - The <template> tag defines a template for all the cards in a deck. The “code” in the <template> tag is added to each card in the deck. Only one <template> tag for each deck can be specified. This tag can only contain <do> and <onevent> tags.
The template tag attributes the Web browser supports are:
| Attribute |
Value(s) |
Description |
Comments |
| onenterbackward |
url |
Occurs when the user navigates into a card by means of a “prev” task. |
SUPPORTED. |
| onenterforward |
url |
Occurs when the user navigates into a card by means of a “go” task. |
SUPPORTED. |
| ontimer |
url |
Occurs when the “timer” expires. |
SUPPORTED. |
| style |
property |
Cascading Style Sheet attribute. |
SUPPORTED |
NOTE: The implication for rendering WML pages is that the local environment always overrides a global template for <do> types with the same name.
- <access> - The <access> tag limits access within the deck to certain cards. This tag is not supported.